.\"
.\" This file and its contents are supplied under the terms of the
.\" Common Development and Distribution License ("CDDL"), version 1.0.
.\" You may only use this file in accordance with the terms of version
.\" 1.0 of the CDDL.
.\"
.\" A full copy of the text of the CDDL should have accompanied this
.\" source.  A copy of the CDDL is also available via the Internet at
.\" http://www.illumos.org/license/CDDL.
.\"
.\"
.\" Copyright (c) 2012, Joyent, Inc. All Rights Reserved
.\" Copyright (c) 2013, 2017 by Delphix. All rights reserved.
.\" Copyright (c) 2016-2017, Chris Fraire <cfraire@me.com>.
.\" Copyright 2021 OmniOS Community Edition (OmniOSce) Association.
.\" Copyright 2021 Tintri by DDN, Inc. All rights reserved.
.\"
.Dd August 20, 2022
.Dt IPADM 8
.Os
.Sh NAME
.Nm ipadm
.Nd configure IP and IPMP interfaces, addresses and protocols
.Sh SYNOPSIS
.Nm
.Ic help
.Nm
.Ic create-if
.Op Fl t
.Ar interface
.Nm
.Ic create-ip
.Op Fl t
.Ar interface
.Nm
.Ic delete-if
.Ar interface
.Nm
.Ic delete-ip
.Ar interface
.Pp
.Nm
.Ic create-ipmp
.Op Fl t
.Op Fl i Ar interface Ns Oo , Ns Ar interface Oc Ns ...
.Ar ipmp-interface
.Nm
.Ic delete-ipmp
.Ar ipmp-interface
.Nm
.Ic add-ipmp
.Op Fl t
.Fl i Ar interface Ns Oo , Ns Ar interface Oc Ns ...
.Ar ipmp-interface
.Nm
.Ic remove-ipmp
.Op Fl t
.Fl i Ar interface Ns Oo , Ns Ar interface Oc Ns ...
.Ar ipmp-interface
.Pp
.Nm
.Ic disable-if
.Fl t
.Ar interface
.Nm
.Ic enable-if
.Fl t
.Ar interface
.Nm
.Ic show-if
.Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
.Op Ar interface
.Pp
.Nm
.Ic set-ifprop
.Op Fl t
.Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
.Fl m Ar protocol
.Ar interface
.Nm
.Ic reset-ifprop
.Op Fl t
.Fl p Ar prop
.Fl m Ar protocol
.Ar interface
.Nm
.Ic show-ifprop
.Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar value Oc Ns ...
.Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
.Op Fl m Ar protocol
.Op Ar interface
.Pp
.Nm
.Ic create-addr
.Op Fl t
.Fl T Cm static
.Op Fl d
.Fl a Oo Cm local Ns | Ns Cm remote Ns = Oc Ns
.Ar addr Ns Oo / Ns Ar prefixlen Oc Ns ...
.Ar addrobj
.Nm
.Ic create-addr
.Op Fl t
.Fl T Cm dhcp
.Op Fl 1
.Op Fl h Ar hostname
.Op Fl w Bro Ar seconds Ns | Ns Cm forever Brc
.Ar addrobj
.Nm
.Ic create-addr
.Op Fl t
.Fl T Cm addrconf
.Op Fl i Ar interface-id
.Oo Fl p Bro Cm stateful Ns | Ns Cm stateless Brc Ns = Ns
.Bro Cm yes Ns | Ns Cm no Brc Oc Ns ...
.Ar addrobj
.Nm
.Ic delete-addr
.Op Fl r
.Ar addrobj
.Nm
.Ic show-addr
.Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
.Op Ar addrobj
.Nm
.Ic refresh-addr
.Op Fl i
.Ar addrobj
.Nm
.Ic down-addr
.Op Fl t
.Ar addrobj
.Nm
.Ic up-addr
.Op Fl t
.Ar addrobj
.Nm
.Ic disable-addr
.Op Fl t
.Ar addrobj
.Nm
.Ic enable-addr
.Op Fl t
.Ar addrobj
.Pp
.Nm
.Ic set-addrprop
.Op Fl t
.Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
.Ar addrobj
.Nm
.Ic reset-addrprop
.Op Fl t
.Fl p Ar prop
.Ar addrobj
.Nm
.Ic show-addrprop
.Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
.Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
.Op Ar addrobj
.Pp
.Nm
.Ic set-prop
.Op Fl t
.Fl p Ar prop Ns Oo Cm + Ns | Ns Cm - Oc Ns = Ns
.Ar value Ns Oo , Ns Ar value Oc Ns ...
.Ar protocol
.Nm
.Ic reset-prop
.Op Fl t
.Fl p Ar prop
.Ar protocol
.Nm
.Ic show-prop
.Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
.Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
.Op Ar protocol
.Sh DESCRIPTION
The
.Nm
command is a stable replacement for the
.Xr ifconfig 8
and
.Xr ndd 8
commands.
It is used to create IP interfaces and to configure IP addresses on those
interfaces.
It is also used to get, set or reset properties on interfaces, addresses and
protocols.
.Pp
For subcommands that take an
.Em addrobj ,
the
.Em addrobj
specifies a unique address on the system, and must be unique itself.
It is made up of two parts, delimited by a
.Sq / .
The first part is the name of the interface and the second part is an arbitrary
string up to 32 alphanumeric characters long, where the first character must be
alphabetic
.Pq e.g. a-z,A-Z .
For example,
.Qq lo0/v4
is a loopback interface
.Em addrobj
name, which could also be called
.Qq lo0/ipv4loopback .
Consumers should note that this length limit may be lifted in the future.
.Pp
For subcommands that take a
.Em protocol ,
this can be one of the following values:
.Cm ip ,
.Cm ipv4 ,
.Cm ipv6 ,
.Cm icmp ,
.Cm tcp ,
.Cm sctp
or
.Cm udp .
.Sh SUBCOMMANDS
When invoked with no arguments,
.Nm
shows the current address properties, in the same way as
.Nm
.Ic show-addr .
.Pp
The following subcommands are supported:
.Pp
.Bl -tag -compact -width Ds
.It Xo
.Nm
.Ic help
.Xc
Display brief command usage.
.Pp
.It Xo
.Nm
.Ic create-if
.Op Fl t
.Ar interface
.Xc
.It Xo
.Nm
.Ic create-ip
.Op Fl t
.Ar interface
.Xc
Create an IP interface that will handle both IPv4 and IPv6 packets.
The interface will be enabled as part of the creation process.
The IPv4 interface will have the address 0.0.0.0.
The IPv6 interface will have the address ::.
The subcommands
.Ic create-if
and
.Ic create-ip
are functionally equivalent aliases of each other.
.Bl -tag -width Ds
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic delete-if
.Ar interface
.Xc
.It Xo
.Nm
.Ic delete-ip
.Ar interface
.Xc
Permanently delete the specified IP interface.
The subcommands
.Ic delete-if
and
.Ic delete-ip
are functionally equivalent aliases of each other.
.Pp
.It Xo
.Nm
.Ic create-ipmp
.Op Fl t
.Op Fl i Ar interface Ns Oo , Ns Ar interface Oc Ns ...
.Ar ipmp-interface
.Xc
Create an IPMP interface that will handle both IPv4 and IPv6 packets.
The interface will be enabled as part of the creation process.
The IPv4 interface will have the address 0.0.0.0.
The IPv6 interface will have the address ::.
.Bl -tag -width Ds
.It Fl i Ns \&, Ns Fl -interface
Interface(s) to be added to the new IPMP interface.
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic delete-ipmp
.Ar ipmp-interface
.Xc
Permanently delete the IPMP interface.
.Pp
.It Xo
.Nm
.Ic add-ipmp
.Op Fl t
.Fl i Ar interface Ns Oo , Ns Ar interface Oc Ns ...
.Ar ipmp-interface
.Xc
Add the IP interface(s) to the IPMP interface.
.Bl -tag -width ""
.It Fl i Ns \&, Ns Fl -interface
Interface(s) to be added to the IPMP interface.
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic remove-ipmp
.Op Fl t
.Fl i Ar interface Ns Oo , Ns Ar interface Oc Ns ...
.Ar ipmp-interface
.Xc
Remove the IP interface(s) from the IPMP interface.
.Bl -tag -width ""
.It Fl i Ns \&, Ns Fl -interface
Interface(s) to be removed from the IPMP interface.
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic disable-if
.Fl t
.Ar interface
.Xc
Disable the specified IP interface.
.Bl -tag -width Ds
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic enable-if
.Fl t
.Ar interface
.Xc
Enable the specified IP interface.
.Bl -tag -width Ds
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic show-if
.Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
.Op Ar interface
.Xc
Show the current IP interface configuration.
.Bl -tag -width Ds
.It Fl o Ns \&, Ns Fl -output
Select which fields will be shown.
The field value can be one of the following names:
.Bl -tag -compact -width "PERSISTENT"
.It Cm ALL
Display all fields.
.It Cm IFNAME
The name of the interface.
.It Cm STATE
The state can be one of the following values:
.Bl -tag -compact -width "disabled"
.It Sy ok
resources for the interface have been allocated
.It Sy offline
the interface is offline
.It Sy failed
the interface's datalink is down
.It Sy down
the interface is down
.It Sy disabled
the interface is disabled
.El
.It Cm CURRENT
A set of single character flags indicating the following:
.Bl -tag -compact -width "b"
.It Sy b
broadcast (mutually exclusive with
.Sq p )
.It Sy m
multicast
.It Sy p
point-to-point (mutually exclusive with
.Sq b )
.It Sy v
virtual interface
.It Sy I
IPMP
.It Sy s
IPMP standby
.It Sy i
IPMP inactive
.It Sy V
VRRP
.It Sy a
VRRP accept mode
.It Sy 4
IPv4
.It Sy 6
IPv6
.El
.It Cm PERSISTENT
A set of single character flags showing what configuration will be used the
next time the interface is enabled:
.Bl -tag -compact -width "s"
.It Sy s
IPMP standby
.It Sy 4
IPv4
.It Sy 6
IPv6
.El
.El
.It Fl p Ns \&, Ns Fl -parsable
Print the output in a parsable format.
.El
.Pp
.It Xo
.Nm
.Ic set-ifprop
.Op Fl t
.Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
.Fl m Ar protocol
.Ar interface
.Xc
Set a property's value(s) on the specified IP interface.
.Bl -tag -width Ds
.It Fl m Ns \&, Ns Fl -module
Specify which protocol the setting applies to.
.It Fl p Ns \&, Ns Fl -prop
Specify the property name and value(s).
The property name can be one of the following:
.Bl -tag -compact -width "exchange_routes"
.It Cm arp
Address resolution protocol
.Pq Cm on Ns / Ns Cm off .
.It Cm exchange_routes
Exchange of routing data
.Pq Cm on Ns / Ns Cm off .
.It Cm forwarding
IP Forwarding
.Pq Cm on Ns / Ns Cm off
.It Cm metric
Set the routing metric to the numeric value.
The value is treated as extra hops to the destination.
.It Cm mtu
Set the maximum transmission unit to the numeric value.
.It Cm nud
Neighbor unreachability detection
.Pq Cm on Ns / Ns Cm off
.It Cm usesrc
Indicates which interface to use for source address selection.
A value
.Cm none
may also be used.
.El
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic reset-ifprop
.Op Fl t
.Fl p Ar prop
.Fl m Ar protocol
.Ar interface
.Xc
Reset the specified IP interface's property value to the default.
.Bl -tag -width Ds
.It Fl m Ns \&, Ns Fl -module
Specify which protocol the setting applies to.
.It Fl p Ns \&, Ns Fl -prop
Specify the property name.
See the
.Nm ipadm Ic set-ifprop
subcommand for the list of property names.
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic show-ifprop
.Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar value Oc Ns ...
.Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
.Op Fl m Ar protocol
.Op Ar interface
.Xc
Display the property values for one or all of the IP interfaces.
.Bl -tag -width Ds
.It Fl c Ns \&, Ns Fl -parsable
Print the output in a parsable format.
.It Fl m Ns \&, Ns Fl -module
Specify which protocol to display.
.It Fl o Ns \&, Ns Fl -output
Select which fields will be shown.
The field value can be one of the following names:
.Bl -tag -compact -width "PERSISTENT"
.It Cm ALL
Display all fields.
.It Cm IFNAME
The name of the interface.
.It Cm PROPERTY
The name of the property.
.It Cm PROTO
The name of the protocol.
.It Cm PERM
If the property is readable
.Pq Qq r
and/or writable
.Pq Qq w .
.It Cm CURRENT
The value of the property.
.It Cm PERSISTENT
The persistent value of the property.
.It Cm DEFAULT
The default value of the property.
.It Cm POSSIBLE
The possible values for the property.
.El
.It Fl p Ns \&, Ns Fl -prop
Specify which properties to display.
See the
.Nm ipadm Ic set-ifprop
subcommand for the list of property names.
.El
.Pp
.It Xo
.Nm
.Ic create-addr
.Op Fl t
.Fl T Cm static
.Op Fl d
.Fl a Oo Cm local Ns | Ns Cm remote Ns = Oc Ns
.Ar addr Ns Oo / Ns Ar prefixlen Oc Ns ...
.Ar addrobj
.Xc
Create an address on the specified IP interface using static configuration.
The address will be enabled but can disabled using the
.Nm ipadm Ic disable-addr
subcommand.
Note that
.Cm addrconf
address configured on the interface is required to configure
.Cm static
IPv6 address on the same interface.
This takes the following options:
.Bl -tag -width Ds
.It Fl a Ns \&, Ns Fl -address
Specify the address.
The
.Cm local
or
.Cm remote
prefix can be used for a point-to-point interface.
In this case, both addresses must be given.
Otherwise, the equal sign
.Pq Qq =
should be omitted and the address should be provided by itself without second
address.
.It Fl d Ns \&, Ns Fl -down
The address is down.
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic create-addr
.Op Fl t
.Fl T Cm dhcp
.Op Fl 1
.Op Fl h Ar hostname
.Op Fl w Bro Ar seconds Ns | Ns Cm forever Brc
.Ar addrobj
.Xc
Create an address on the specified IP interface using DHCP.
This takes the following options:
.Bl -tag -width Ds
.It Fl 1 Ns \&, Ns Fl -primary
Specify that the interface is primary.
One effect will be that
.Xr nodename 5
will serve as
.Fl h Ns \&, Ns Fl -reqhost
if that switch is not otherwise specified.
.It Fl h Ns \&, Ns Fl -reqhost
Specify the host name to send to the DHCP server in order to request an
association of a Fully Qualified Domain Name to the interface.
An FQDN is determined from
.Ar hostname
if it is "rooted" (ending in a '.'), or if it consists of at least three
DNS labels, or by appending to
.Ar hostname
the DNS domain name value configured in
.Pa /etc/default/dhcpagent
for
.Xr dhcpagent 8 .
N.b. that the DHCP server implementation ultimately determines whether and
how the client-sent FQDN is used.
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.It Fl w Ns \&, Ns Fl -wait
Specify the time, in seconds, that the command should wait to obtain an
address; or specify
.Cm forever
to wait without interruption.
The default value is 120.
.El
.Pp
.It Xo
.Nm
.Ic create-addr
.Op Fl t
.Fl T Cm addrconf
.Op Fl i Ar interface-id
.Oo Fl p Bro Cm stateful Ns | Ns Cm stateless Brc Ns = Ns
.Bro Cm yes Ns | Ns Cm no Brc Oc Ns ...
.Ar addrobj
.Xc
Create an auto-configured address on the specified IP interface.
This takes the following options:
.Bl -tag -width Ds
.It Fl i Ns \&, Ns Fl -interface-id
Specify the interface ID to be used.
.It Fl p Ns \&, Ns Fl -prop
Specify which method of auto-configuration should be used.
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic delete-addr
.Op Fl r
.Ar addrobj
.Xc
Delete the given address.
.Bl -tag -width Ds
.It Fl r Ns \&, Ns Fl -release
Indicate that the DHCP-assigned address should be released.
.El
.Pp
.It Xo
.Nm
.Ic show-addr
.Op Oo Fl p Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
.Op Ar addrobj
.Xc
Show the current address properties.
.Bl -tag -width Ds
.It Fl o Ns \&, Ns Fl -output
Select which fields will be shown.
The field value can be one of the following names:
.Bl -tag -compact -width "PERSISTENT"
.It Cm ALL
Display all fields.
.It Cm ADDROBJ
The name of the address.
.It Cm TYPE
The type of the address
.Pq Sy static Ns / Ns Sy dhcp Ns / Ns Sy addrconf .
.It Cm STATE
The state of the address.
It can be one of the following values:
.Bl -tag -compact -width "inaccessible"
.It Sy disabled
see the
.Nm ipadm Ic disable-addr
subcommand
.It Sy down
see the
.Nm ipadm Ic down-addr
subcommand
.It Sy duplicate
the address is duplicate
.It Sy inaccessible
the interface for this address has failed
.It Sy ok
the address is up
.It Sy tentative
duplicate address detection in progress
.El
.It Cm CURRENT
A set of single character flags indicating the following:
.Bl -tag -compact -width "U"
.It Sy U
up
.It Sy u
unnumbered
.Pq matches another local address
.It Sy p
private, not advertised to routing
.It Sy t
temporary IPv6 address
.It Sy d
deprecated
.Pq not used for outgoing packets
.El
.It Cm PERSISTENT
A set of single character flags showing the configuration which will be used
when the address is enabled.
.Bl -tag -compact -width "U"
.It Sy U
up
.It Sy p
private, not advertised to routing
.It Sy d
deprecated
.Pq not used for outgoing packets
.El
.It Cm ADDR
The address.
.El
.It Fl p Ns \&, Ns Fl -parsable
Print the output in a parsable format.
.El
.Pp
.It Xo
.Nm
.Ic refresh-addr
.Op Fl i
.Ar addrobj
.Xc
Extend the lease for
.Sy DHCP
addresses.
It also restarts duplicate address detection for
.Cm static
addresses.
.Bl -tag -width ""
.It Fl i Ns \&, Ns Fl -inform
Obtain network configuration from DHCP without taking a lease on the address.
.El
.Pp
.It Xo
.Nm
.Ic down-addr
.Op Fl t
.Ar addrobj
.Xc
Down the address.
This will stop packets from being sent or received.
.Bl -tag -width Ds
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic up-addr
.Op Fl t
.Ar addrobj
.Xc
Up the address.
This will enable packets to be sent and received.
.Bl -tag -width Ds
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic disable-addr
.Op Fl t
.Ar addrobj
.Xc
Disable the address.
.Bl -tag -width Ds
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic enable-addr
.Op Fl t
.Ar addrobj
.Xc
Enable the address.
.Bl -tag -width Ds
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic set-addrprop
.Op Fl t
.Fl p Ar prop Ns = Ns Ar value Ns Oo , Ns Ar value Oc Ns ...
.Ar addrobj
.Xc
Set a property's value(s) on the addrobj.
.Bl -tag -width Ds
.It Fl p Ns \&, Ns Fl -prop
Specify the property name and value(s).
The property name can be one of the following:
.Bl -tag -compact -width "deprecated"
.It Cm broadcast
The broadcast address (read-only).
.It Cm deprecated
The address should not be used to send packets but can still receive packets
.Pq Cm on Ns / Ns Cm off .
.It Cm prefixlen
The number of bits in the IPv4 netmask or IPv6 prefix.
.It Cm primary
The DHCP primary interface flag (read-only).
.It Cm private
The address is not advertised to routing
.Pq Cm on Ns / Ns Cm off .
.It Cm reqhost
The host name to send to the DHCP server in order to request an association
of the FQDN to the interface.
For a primary DHCP interface,
.Xr nodename 5
is sent if this property is not defined.
See the
.Nm
.Ic create-addr
.Fl T Cm dhcp
subcommand for the explanation of how an FQDN is determined.
.It Cm transmit
Packets can be transmitted
.Pq Cm on Ns / Ns Cm off .
.It Cm zone
The zone the addrobj is in (temporary-only--use
.Xr zonecfg 8
to make persistent).
.El
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic reset-addrprop
.Op Fl t
.Fl p Ar prop
.Ar addrobj
.Xc
Reset the addrobj's property value to the default.
.Bl -tag -width Ds
.It Fl p Ns \&, Ns Fl -prop
Specify the property name.
See the
.Nm ipadm Ic set-addrprop
subcommand for the list of property names.
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic show-addrprop
.Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
.Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
.Op Ar addrobj
.Xc
Display the property values for one or all of the addrobjs.
.Bl -tag -width Ds
.It Fl c Ns \&, Ns Fl -parsable
Print the output in a parsable format.
.It Fl o Ns \&, Ns Fl -output
Select which fields will be shown.
The field value can be one of the following names:
.Bl -tag -compact -width "PERSISTENT"
.It Cm ALL
Display all fields.
.It Cm ADDROBJ
The name of the addrobj.
.It Cm PROPERTY
The name of the property.
.It Cm PERM
If the property is readable
.Pq Qq r
and/or writable
.Pq Qq w .
.It Cm CURRENT
The value of the property.
.It Cm PERSISTENT
The persistent value of the property.
.It Cm DEFAULT
The default value of the property.
.It Cm POSSIBLE
The possible values for the property.
.El
.It Fl p Ns \&, Ns Fl -prop
Specify which properties to display.
See the
.Nm ipadm Ic set-addrprop
subcommand for the list of property names.
.El
.Pp
.It Xo
.Nm
.Ic set-prop
.Op Fl t
.Fl p Ar prop Ns Oo Cm + Ns | Ns Cm - Oc Ns = Ns
.Ar value Ns Oo , Ns Ar value Oc Ns ...
.Ar protocol
.Xc
Set a property's value(s) on the protocol.
.Bl -tag -width Ds
.It Fl p Ns \&, Ns Fl -prop
Specify the property name and value(s).
The optional
.Sy + Ns | Ns Sy -
syntax can be used to add/remove values from the current list of values on the
property.
The property name can be one of the following:
.Bl -tag -compact -width "smallest_nonpriv_port"
.It Cm congestion_control
The default congestion-control algorithm to be used for new connections
.Pq TCP .
.It Cm ecn
Explicit congestion control
.Pq Cm never Ns / Ns Cm passive Ns / Ns Cm active
.Pq TCP .
.It Cm extra_priv_ports
Additional privileged ports
.Pq SCTP/TCP/UDP .
.It Cm forwarding
Packet forwarding
.Pq Cm on Ns / Ns Cm off .
.It Cm hoplimit
The IPv6 hoplimit.
.It Cm hostmodel
IP packet handling on multi-homed systems
.Pq Cm weak Ns / Ns Cm strong Ns / Ns Cm src-priority
.Pq IPv4/IPv6 .
.Cm weak
and
.Cm strong
correspond to the model definitions defined in RFC 1122.
.Cm src-priority
is a hybrid mode where outbound packets are sent from the interface with the
packet's source address if possible.
.It Cm largest_anon_port
Largest ephemeral port
.Pq SCTP/TCP/UDP .
.It Cm max_buf
Maximum receive or send buffer size
.Pq ICMP/SCTP/TCP/UDP .
This also sets the upper limit for the
.Cm recv_buf
and
.Cm send_buf
properties.
.It Cm recv_buf
Default receive buffer size
.Pq ICMP/SCTP/TCP/UDP .
The maximum value for this property is controlled by the
.Cm max_buf
property.
.It Cm sack
Selective acknowledgement
.Pq Cm active Ns / Ns Cm passive Ns / Ns Cm never
.Pq TCP .
.It Cm send_buf
Default send buffer size
.Pq ICMP/SCTP/TCP/UDP .
The maximum value for this property is controlled by the
.Cm max_buf
property.
.It Cm smallest_anon_port
Smallest ephemeral port
.Pq SCTP/TCP/UDP .
.It Cm smallest_nonpriv_port
Smallest non-privileged port
.Pq SCTP/TCP/UDP .
.It Cm ttl
The IPv4 time-to-live.
.El
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic reset-prop
.Op Fl t
.Fl p Ar prop
.Ar protocol
.Xc
Reset a protocol's property value to the default.
.Bl -tag -width Ds
.It Fl p Ns \&, Ns Fl -prop
Specify the property name.
See the
.Nm ipadm Ic set-prop
subcommand for the list of property names.
.It Fl t Ns \&, Ns Fl -temporary
Temporary, not persistent across reboots.
.El
.Pp
.It Xo
.Nm
.Ic show-prop
.Op Oo Fl c Oc Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
.Op Fl p Ar prop Ns Oo , Ns Ar prop Oc Ns ...
.Op Ar protocol
.Xc
Display the property values for one or all of the protocols.
.Bl -tag -width Ds
.It Fl c Ns \&, Ns Fl -parsable
Print the output in a parsable format.
.It Fl o Ns \&, Ns Fl -output
Select which fields will be shown.
The field value can be one of the following names:
.Bl -tag -compact -width "PERSISTENT"
.It Cm ALL
Display all fields.
.It Cm PROTO
The name of the protocol.
.It Cm PROPERTY
The name of the property.
.It Cm PERM
If the property is readable
.Pq Qq r
and/or writable
.Pq Qq w .
.It Cm CURRENT
The value of the property.
.It Cm PERSISTENT
The persistent value of the property.
.It Cm DEFAULT
The default value of the property.
.It Cm POSSIBLE
The possible values for the property.
.El
.It Fl p Ns \&, Ns Fl -prop
Specify which properties to display.
See the
.Nm ipadm Ic set-prop
subcommand for the list of property names.
.El
.El
.Sh SEE ALSO
.Xr nodename 5 ,
.Xr nsswitch.conf 5 ,
.Xr dhcp 7 ,
.Xr arp 8 ,
.Xr cfgadm 8 ,
.Xr dhcpagent 8 ,
.Xr dladm 8 ,
.Xr if_mpadm 8 ,
.Xr ifconfig 8 ,
.Xr ndd 8 ,
.Xr zonecfg 8
